package com.siyu.common.constant;

import com.siyu.common.config.change.ChangeConfigProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class MinioOrOssConstants {


    /**
     * 控制minio存储或者oss存储   true oss  false  minio
     */
    //public static final Boolean MINIOOROSS = false;
    private static Boolean MINIOOROSS;

    @Autowired
    private ChangeConfigProperties changeConfigProperties;

    @PostConstruct
    public void initialize() {
        MINIOOROSS = changeConfigProperties.getChange();
    }

    public static Boolean getMinioOrOss() {
        return MINIOOROSS;
    }
}
